home *** CD-ROM | disk | FTP | other *** search
-
-
-
- CSPLIT(1L) Misc. Reference Manual Pages CSPLIT(1L)
-
-
-
- NNNNAAAAMMMMEEEE
- csplit - split a file into sections determined by context
- lines
-
- SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
- ccccsssspppplllliiiitttt [-sqkz] [-f prefix] [-b suffix] [ - n digits] [ - -
- prefix=prefix] [--suffix=suffix] [--digits=digits] [--quiet]
- [--silent] [--keep-files] [--elide-empty-files] [--help] [--
- version] file pattern...
-
- DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
- This manual page documents the GNU version of ccccsssspppplllliiiitttt.
- ccccsssspppplllliiiitttt creates zero or more output files containing sections
- of the given input _f_i_l_e, or the standard input if the name `
- - ' is given. By default, ccccsssspppplllliiiitttt prints the number of bytes
- written to each output file after it has been created.
-
- The contents of the output files are determined by the _p_a_t_-
- _t_e_r_n arguments. An error occurs if a pattern argument
- refers to a nonexistent line of the input file, such as if
- no remaining line matches a given regular expression. After
- all the given patterns have been matched, any remaining out-
- put is copied into one last output file. The types of pat-
- tern arguments are:
-
- _l_i_n_e
- Create an output file containing the current line
- up to (but not including) line _l_i_n_e (a positive
- integer) of the input file. If followed by a
- repeat count, also create an output file contain-
- ing the next _l_i_n_e lines of the input file once for
- each repeat.
-
- /_r_e_g_e_x_p/[_o_f_f_s_e_t]
- Create an output file containing the current line
- up to (but not including) the next line of the
- input file that contains a match for _r_e_g_e_x_p. The
- optional _o_f_f_s_e_t is a `+' or `-' followed by a
- positive integer. If it is given, the input up to
- the matching line plus or minus _o_f_f_s_e_t is put into
- the output file, and the line after that begins
- the next section of input.
-
- %_r_e_g_e_x_p%[_o_f_f_s_e_t]
- Like the previous type, except that it does not
- create an output file, so that section of the
- input file is effectively ignored.
-
- {_r_e_p_e_a_t-_c_o_u_n_t}
- Repeat the previous pattern _r_e_p_e_a_t-_c_o_u_n_t (a posi-
- tive integer) additional times. An asterisk may be
- given in place of the (integer) repeat count, in
-
-
-
- FSF Last change: GNU Text Utilities 1
-
-
-
-
-
-
- CSPLIT(1L) Misc. Reference Manual Pages CSPLIT(1L)
-
-
-
- which case the preceeding pattern is repeated as
- many times as necessary until the input is
- exausted.
-
- The output file names consist of a prefix followed by a suf-
- fix. By default, the suffix is merely an ascending linear
- sequence of two-digit decimal numbers starting with 00 and
- ranging up to 99, however this default may be overridden by
- either the --_d_i_g_i_t_s option or by the --_s_u_f_f_i_x option. (See
- below.) In any case, concatenating the output files in
- sorted order by file name produces the original input file,
- in order. The default output file name prefix is `xx'.
-
- By default, if ccccsssspppplllliiiitttt encounters an error or receives a
- hangup, interrupt, quit, or terminate signal, it removes any
- output files that it has created so far before it exits.
-
- OOOOPPPPTTTTIIIIOOOONNNNSSSS
- -_f, --_p_r_e_f_i_x=_p_r_e_f_i_x
- Use _p_r_e_f_i_x as the output file name prefix string.
-
- -_b, --_s_u_f_f_i_x=_s_u_f_f_i_x
- Use _s_u_f_f_i_x as the output file name suffix string. When
- this option is specified, the suffix string must
- include exactly one printf(3) style conversion specifi-
- cation (such as %d, possibly including format specifi-
- cation flags, a field width, a precision specifica-
- tions, or all of these kinds of modifiers). The
- conversion specification must be suitable for convert-
- ing a binary integer argument to readable form. Thus,
- only `d', 'i', `u', `o', `x', and `X' format specifiers
- are allowed. The entire suffix string is given (with
- the current output file number) to sprintf(3) to form
- the file name suffixes for each of the individual out-
- put files in turn. Note that when this option is used,
- the --_d_i_g_i_t_s option is ignored.
-
- -_n, --_d_i_g_i_t_s=_d_i_g_i_t_s
- Use output file names containing numbers that are
- _d_i_g_i_t_s digits long instead of the default 2.
-
- -_k, --_k_e_e_p-_f_i_l_e_s
- Do not remove output files when errors are encountered.
-
- -_z, --_e_l_i_d_e-_e_m_p_t_y-_f_i_l_e_s
- Suppress the generation of zero-length output files.
- (In cases where the section delimiters of the input
- file are supposed to mark the first lines of each of
- the sections, the first output file will generally be a
- zero-length file unless you use this option.) Note
- that the output file sequence numbers will always run
- consecutively, starting from 0, even in cases where
-
-
-
- FSF Last change: GNU Text Utilities 2
-
-
-
-
-
-
- CSPLIT(1L) Misc. Reference Manual Pages CSPLIT(1L)
-
-
-
- zero-length output sections are suppressed due to the
- use of this option.
-
- -_s, -_q, --_s_i_l_e_n_t, --_q_u_i_e_t
- Do not print counts of output file sizes.
-
- --_h_e_l_p
- Print a usage message and exit with a non-zero status.
-
- --_v_e_r_s_i_o_n
- Print version information on standard output then exit.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- FSF Last change: GNU Text Utilities 3
-
-
-
-